#include "Object.h"

bool AObject::Fill_Combine(CDraw &para, AnalyseClass &analyse, bool Jcomb){
	int iter=para.global.Fill_Iter;

	if(!Jcomb){
		for(iter=para.global.Fill_Iter;iter<analyse.var.var.size();iter++){
			analyse.var.var[iter].variable = -10000.0; 
		}
		analyse.var.var[iter-1].variable = 0; 
		return(false);
	}
//	ShowMessage(2,"iter in combine",iter);
	//two lep combine 
	analyse.var.var[iter].variable = Vcombine1[0].M(); 
	iter++;
	analyse.var.var[iter].variable = Vcombine1[0].Pt(); 
	iter++;
	analyse.var.var[iter].variable = Vcombine1[0].Eta(); 
	iter++;

	//two jet higgs 1
	analyse.var.var[iter].variable = Vcombine2[0].M(); 
	iter++;
	analyse.var.var[iter].variable = Vcombine2[0].Pt(); 
	iter++;
	analyse.var.var[iter].variable = Vcombine2[0].Eta(); 
	iter++;
	//two light higgs 1
	analyse.var.var[iter].variable = Vcombine3[0].M(); 
	iter++;
	analyse.var.var[iter].variable = Vcombine3[0].Pt(); 
	iter++;
	analyse.var.var[iter].variable = Vcombine3[0].Eta(); 
	iter++;

	//two light higgiter2
	analyse.var.var[iter].variable = Vcombine3[1].M(); 
	iter++;
	analyse.var.var[iter].variable = Vcombine3[1].Pt(); 
	iter++;
	analyse.var.var[iter].variable = Vcombine3[1].Eta(); 
	iter++;

	//Heavy higgs
	analyse.var.var[iter].variable = Vcombine4[0].M(); 
	iter++;
	analyse.var.var[iter].variable = Vcombine4[0].Pt(); 
	iter++;
	analyse.var.var[iter].variable = Vcombine4[0].Eta(); 
	iter++;

	//angle
	analyse.var.var[iter].variable = Vangle_lep[0]; 
	iter++;
	analyse.var.var[iter].variable = Vangle_jet[0]; 
	iter++;
	analyse.var.var[iter].variable = Vangle_lep_jet[0]; 
	iter++;
	analyse.var.var[iter].variable = Vangle_lep_jet[1]; 
	iter++;
	analyse.var.var[iter].variable = Vangle_lep_jet[2]; 
	iter++;
	analyse.var.var[iter].variable = Vangle_lep_jet[3]; 
	iter++;
	analyse.var.var[iter].variable = Vangle_combine[0]; 
	iter++;

	//HT
	analyse.var.var[iter].variable = Vvalue[0]; 
	iter++;

	analyse.var.var[iter].variable = Vvalue[1]; 
//	ShowMessage(2,"fill combine num", para.Event(), Vvalue[1]);
	iter++;

//	ShowMessage(2,"iter after combine",iter);
	para.global.Fill_Iter=iter;
	return(true);
}
